package com.ms.business.db;

import java.util.HashMap;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

import com.xpec.c4.db.model.log.basic.BasicLogModel;
@Entity
@org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true)
@Table(name = "cooperator_request_log")
/**
 * 運營商操作log 記錄
 * @author wuweijun
 *
 */
public class BusinessCooperatorRequestLogModel extends BasicLogModel{
	/**
	 * 
	 */
	private static final long serialVersionUID = 7345622426731075791L;
	/**
	 * 請求jsp名稱
	 */
	private String  requestUrl;
	/**
	 * 來源ip
	 */
	private String clientIp;
	/**
	 * post 參數
	 */
	private HashMap<String,String> postParam  = new HashMap<String , String>();
	/**
	 * 結果
	 */
	private int result;
	/**
	 * 額外記錄事項
	 * 
	 */
	private HashMap<String,String> specialNotice = new HashMap<String , String>();
	
	public BusinessCooperatorRequestLogModel(){}
	public BusinessCooperatorRequestLogModel(String clientIp, HashMap<String,String> postParam, int result, HashMap<String,String> specialNotice){
		this.clientIp = clientIp;
		this.postParam = postParam;
		this.result  = result;
		this.specialNotice = specialNotice;
	}
	public String getClientIp() {
		return clientIp;
	}
	public void setClientIp(String clientIp) {
		this.clientIp = clientIp;
	}
	@Type(type = "com.xpec.c4.db.usertype.MapStringStringToString")
	public HashMap<String, String> getPostParam() {
		return postParam;
	}
	public void setPostParam(HashMap<String, String> postParam) {
		this.postParam = postParam;
	}
	public int getResult() {
		return result;
	}
	public void setResult(int result) {
		this.result = result;
	}
	@Type(type = "com.xpec.c4.db.usertype.MapStringStringToString")
	public HashMap<String, String> getSpecialNotice() {
		return specialNotice;
	}
	public void setSpecialNotice(HashMap<String, String> specialNotice) {
		this.specialNotice = specialNotice;
	}
	public String getRequestUrl() {
		return requestUrl;
	}
	public void setRequestUrl(String requestUrl) {
		this.requestUrl = requestUrl;
	}
	
}
